home *** CD-ROM | disk | FTP | other *** search
/ Aminet 44 / Aminet 44 (2001)(GTI - Schatztruhe)[!][Aug 2001].iso / Aminet / comm / misc / Sashi89.lha / Sashi89 / sources / protocol.h < prev    next >
C/C++ Source or Header  |  2001-05-06  |  1KB  |  65 lines

  1. #ifndef PROTOCOL_H
  2. #define PROTOCOL_H
  3.  
  4. #include "packet.h"
  5.  
  6.  
  7. #define MAX_NAMELENGTH  8
  8. #define MAX_NBNAME      40
  9.  
  10.  
  11. #define PROTOCOL_ERROR -1
  12.  
  13.  
  14. typedef enum
  15. {
  16.     TI_TYPE_EXPR=0x0,
  17.     TI_TYPE_LIST      =0x4,
  18.     TI_TYPE_MATRIX  =0x6,
  19.     TI_TYPE_DATA    =0xA,
  20.     TI_TYPE_TEXT        =0xB,
  21.     TI_TYPE_STRING    =0xC,
  22.     TI_TYPE_GDB            =0xD,
  23.     TI_TYPE_FIGURE    =0xE,
  24.     TI_TYPE_PICTURE    =0x10,
  25.     TI_TYPE_PRGM        =0x12,
  26.     TI_TYPE_FUNC        =0x13,
  27.     TI_TYPE_MAC            =0x14,
  28.     TI_TYPE_FOLDER    =0x1f,
  29.     TI_TYPE_ASM            =0x21
  30. } ti_type;
  31.  
  32. typedef struct
  33. {
  34.   char name[MAX_NAMELENGTH+1];
  35.   int size;
  36.     ti_type    type;
  37.   int state;
  38. } ti_variable;
  39.  
  40. #define TI_OK         0
  41. #define TI_TIMEOUT    -1
  42. #define TI_BADFORMAT  -2
  43. #define TI_FILE       -3 /* Problem with the file */
  44. #define TI_PROTOCOL   -4
  45. #define TI_MEMORY     -5
  46. #define TI_NOTEXIST   -6
  47. #define TI_PING       -7
  48.  
  49.  
  50.  
  51.  
  52. int ti_ping(int nb);
  53. int ti_listdir(char *foldname, ti_variable *vars);
  54. int ti_folderlist(ti_variable *vars);
  55. int ti_sendfile(char *filename, char *defaultfolder);
  56. int ti_getvar(char *foldername, char *varname, char *filename);
  57. int ti_getfolder(char *foldername, char *filename);
  58. char *ti_code2string(int code);
  59. int ti_isvariable(ti_type type);
  60.  
  61.  
  62.  
  63.  
  64. #endif
  65.